def benefit(x: int, i: int) -> int:
    """
    返回将x元投入到第i个项目时的收益。
    :param x: this is a first param
    :param i: this is a second param
    :returns: this is a description of what is returned
    :raises Exception: raises an exception
    """
    if x > 5 or x < 0:
        raise Exception("项目错误")

    if i > 4 or i < 1:
        raise Exception("项目错误")

    arr = [
        [0, 11, 12, 13, 14, 15],
        [0, 0, 5, 10, 15, 20],
        [0, 2, 10, 30, 32, 40],
        [0, 20, 21, 22, 23, 24],
    ]

    return arr[i - 1][x]


def funcname(parameter_list):
    """
    docstring
    """
    pass


print(benefit(5, 4))
